package com.kymatrix.mpo.plus.bpm.server.dao.definition;


import com.kymatrix.mpo.plus.bpm.server.config.mybatis.mapper.BaseMapperX;
import com.kymatrix.mpo.plus.bpm.server.config.mybatis.query.QueryWrapperX;
import com.kymatrix.mpo.plus.bpm.server.model.entity.definition.BpmFormEntity;
import com.kymatrix.mpo.plus.bpm.server.model.form.form.PageQueryBpmFormReq;
import com.kymatrix.mpo.plus.common.business.common.PageResp;
import org.apache.ibatis.annotations.Mapper;

/**
 * 动态表单 Mapper
 *
 * @author 风里雾里
 */
@Mapper
public interface BpmFormMapper extends BaseMapperX<BpmFormEntity> {

    default PageResp<BpmFormEntity> selectPage(PageQueryBpmFormReq reqVO) {
        return selectPage(reqVO, new QueryWrapperX<BpmFormEntity>()
                .likeIfPresent("name", reqVO.getName())
                .orderByDesc("id"));
    }

}
